﻿<%@ Page Title="" Language="C#" MasterPageFile="~/styles/MasterPage.master" AutoEventWireup="true"
    CodeFile="Profile.aspx.cs" Inherits="Account_Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHead" runat="Server">
    <h3 class="titleDetails">
        Profiles</h3>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="Server">
    <div id="playlist">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
            <ContentTemplate>
                <h4>
                    My Playlist</h4>
                <asp:Repeater ID="Rpt_Playlist" runat="server">
                    <HeaderTemplate>
                        <table>
                            <tr>
                                <td width="400">
                                </td>
                                <td width="50">
                                </td>
                                <td width="50">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <h5>
                                    </h5>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkDetails" runat="server" CommandName="Select" CommandArgument=<%# Eval("PlaylistID")%>
                                        OnCommand="LoadPlaylistMusic"></asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="return confirm('Are you sure you want to delete this playlist ?');"></asp:LinkButton>
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <h5>
                                    <%# Eval("Title")%>
                                    -
                                    <%# Eval("NumMusic")%>
                                    Music</h5>
                            </td>
                            <td>
                                <asp:LinkButton ID="lnkDetails" runat="server" CommandName="Select" CommandArgument='<%# Eval("PlaylistID")%>'
                                    OnCommand="LoadPlaylistMusic">details</asp:LinkButton>
                            </td>
                            <td>
                                <asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="return confirm('Are you sure you want to delete this playlist ?');" CommandArgument=<%# Eval("PlaylistID")%> OnCommand="DeletePlaylistMusic">delete</asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table></FooterTemplate>
                </asp:Repeater>
                <p style="margin-left: 20px; margin-bottom: 10px;" id="lblResult" runat="server"
                    text="">
                </p>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    <div>
        <ul class="musicButtonGroup">
            <li><a id="lnkAdd" class="musicButton">Add New</a></li>
        </ul>
    </div>
    <div id="AddPanel" style="display: none">
        <p>
            Playlist :
            <asp:TextBox ID="txtPlaylist" runat="server"></asp:TextBox>
            <asp:Button ID="btnAdd" CssClass="buttonStyle1" runat="server" OnClick="AddNewPlaylist"
                Text="Add" />
        </p>
    </div>
    <div>
        <div id="Playlistmusic" class="musicList" style="display:none" runat="server">
            <h4 id="playlistTitle" runat="server"></h4>
            <asp:Repeater ID="Rpt_MusicList" runat="server">
                <HeaderTemplate>
                    <ul>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <div class="musicItem">                            
                            <span class="musicItemImage"><a href="MusicPlay.aspx?mid=<%# Eval("MusicID")%>">
                                <img class="musicItemCover" src="<%# Eval("Cover")%>" alt="" /></a></span> <span
                                    class="musicItemTitltArtist"><a class="musicItemTitle" href="MusicPlay.aspx?mid=<%# Eval("MusicID")%>">
                                        <%# Eval("Title")%></a>
                                    <br />
                                    <a class="musicItemArtist" href="ArtistMusic.aspx?aid=<%# Eval("ArtistID")%>">
                                        <%# Eval("ArtistName")%></a></span> <span class="musicItemDownload"><a href="#">
                                            <img title="Download" src="styles/images/download.png" alt="" /></a></span>
                        </div>
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    </ul></FooterTemplate>
            </asp:Repeater>
        </div>
    </div>
</asp:Content>
